char c[1002][82];d[3000];s;a;l;main(w,h,i,j,x,y,n){for(scanf("%d%d\n",&w,&h);gets(c[++s]+1););s=0;for(i=1;i<=h;i++)for(j=1;j<=w;j++){if(c[i][j]==42){d[l*2]=i;d[1+2*l++]=j;}while(l){n=--l;x=d[2*n];y=d[2*n+1];s++;c[x][y]=0;if(c[x][y+1]==42){d[n*2]=x;d[n++*2+1]=y+1;c[x][y+1]=0;}if(c[x][y-1]==42){d[n*2]=x;d[n++*2+1]=y-1;c[x][y-1]=0;}if(c[x+1][y]==42){d[n*2]=x+1;d[n++*2+1]=y;c[x+1][y]=0;}if(c[x-1][y]==42){d[n*2]=x-1;d[n++*2+1]=y;c[x-1][y]=0;}l=n;}a=a>s?a:s;s=0;}printf("%d\n",a);}
